<?php$__ERRORS = array();class Application{	function hasErrors(){		global $__ERRORS;		if(count($__ERRORS)>0) return true;		else return false;	}	function addError($key, $msg){		global $__ERRORS;		$__ERRORS[$key][] = $msg;	}	function getErrors(){		global $__ERRORS;		return $__ERRORS;	}}